<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>计算属性computed</title>
</head>
<body>
	<div id="app">
		<ul>
			<li v-for="item in limitList">{{item}}</li>
		</ul>
	</div>
</body>
</html>
<script src="../2.1.8/vue.js"></script>
<script>
	/*
		显示指定数组片段的数据	
	*/
	let vm = new Vue({
		el : '#app',
		data : {
			list : [ 1, 2, 3, 4, 5, 6, 7, 8 ]
		},
		computed : {
			limitList(){
				return this.list.filter(item => item < 5);
			}
		}
	});
</script>